/*

------author : vinee.han--------
------time   : 2015-6-3 15:53:31---------
------codevs.cn   1842  one recursion---------



#include <iostream>
using namespace std;

int arr[1000000];

void func()
{
	arr[30] = 5;
	for(int i=30;i<=1000000;i++)
	{
		arr[i] = 5;
	}
	for(int i=29;i>=0;i--)
	{
		arr[i] = arr[i+1] + arr[i+2] + 1;
	}	
}

int main()
{
	func();
	int n;
	while(cin>>n)
	    cout<<arr[n+30]<<endl;
	return 0;
}
*/

#include <iostream>
using namespace std;

int arr[1000000];

int func(int n)
{
	if(n>=0)
		return 5;
	else
	{
		return func(n+1) + func(n+2) + 1;
	}
}

int main()
{
	int n;
	while(cin>>n)
	    cout<<func(n)<<endl;
	return 0;
}